﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MongoDB.Bson;

namespace MongoServices
{
	/// <summary>
	/// The interface for a &quot;Read/Write&quot; repository.
	/// </summary>
	/// <typeparam name="T">The MongoServices model to be used by this repository.</typeparam>
	public interface IReadWriteRepository<T> : IReadOnlyRepository<T>
		where T : MongoServicesModel
	{
		/// <summary>
		/// Saves the <see cref="MongoServicesModel"/>.
		/// </summary>
		/// <param name="model">The <see cref="MongoServicesModel"/> to be saved.</param>
		void Save(T model);

		/// <summary>
		/// Deleted one document from the mongoDB collection.
		/// </summary>
		/// <param name="id">The &quot;Id&quot; of the document to be deleted.</param>
		void DeleteById(ObjectId id);
	}
}
